cmake_minimum_required(VERSION 3.16)
project(CodSeegment)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_AUTORCC on)
set(CMAKE_AUTOUIC on)
set(CMAKE_AUTOMOC on)

find_package(Qt5 REQUIRED
        Gui
        Widgets
        Core
        Concurrent
        PrintSupport
        Svg
        Charts
        Sql
        )

add_subdirectory(Work/SetPath)
add_subdirectory(Work/TreeView)
add_subdirectory(Work/Cast)
add_subdirectory(Work/TreeWidgetDrag)
add_subdirectory(Work/TwoThread)
add_subdirectory(Work/Time)
add_subdirectory(Work/Graphics)
add_subdirectory(Work/Animation)
add_subdirectory(Work/WindowTypeDemo)
add_subdirectory(Work/XmlWriter)
add_subdirectory(Work/Concurrent)
add_subdirectory(Work/Setting)
add_subdirectory(Work/BarSwitch)
add_subdirectory(Work/Other)
add_subdirectory(Work/Png2SQlite)
add_subdirectory(Work/Query)
add_subdirectory(Work/Test)
add_subdirectory(Work/XML)
add_subdirectory(Work/MultiThread)
add_subdirectory(Work/Config)


include(CPack REQUIRED)
include(CPackIFW REQUIRED)

set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
set(CPACK_PACKAGE_VENDOR "loong")
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}_Setup_V${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME} - Installation Tool")
set(CPACK_PACKAGE_VERSION 1.0.0)

set(CPACK_IFW_VERBOSE ON)

set(CPACK_IFW_PACKAGE_NAME ${CPACK_PACKAGE_NAME})
set(CPACK_IFW_PACKAGE_START_MENU_DIRECTORY Hi-Qt)

set(CPACK_GENERATOR IFW)